<?php slot('sub', $sub); ?>

<div class="center">
    <div id="center_conteiner" class="clearfix">
        <div class="center_sub_conteiner">

            <div class="center_block">
                <div class="header_center_block">
                    <span>Edit room <?php echo $room[0]->getName(); ?></span>
                    <div class="back_button"><a href="<?php echo url_for('hoteldetails', array('id' => $room[0]->getHotelId())); ?>">Back</a></div>
                </div>
                
                <div class="center_line" id="edit_room_id">
                    <div class="field_label">Room ID</div>
                    <input type="text" class="field_input" readonly value="<?php echo $room[0]->getId(); ?>">
                </div>

                <div class="center_line" id="edit_room_hotel">
                    <div class="field_label">Hotel</div>
                    <select class="field_select">
                    <option value="<?php echo $room[0]->getHotelId(); ?>"><?php echo $room[0]['HotelRooms']->getNameEn(); ?></option>";
                    </select>
                </div>

                <div class="center_line" id="edit_room_name">
                    <div class="field_label">Name</div>
                    <input type="text" class="field_input" value="<?php echo $room[0]->getName(); ?>">
                </div>
                
                <div class="center_line" id="edit_room_code">
                    <div class="field_label">Code</div>
                    <input type="text" class="field_input" value="<?php echo $room[0]->getCodeName(); ?>">
                </div>

                <div class="center_line_large" id="edit_room_descripton_en">
                    <div class="field_label">Description in English</div>
                    <textarea rows="5" cols="45" name="text" class="field_textarea" placeholder="text here..."><?php echo $room[0]->getDescriptionEn(); ?></textarea>
                </div>

                <div class="center_line_large" id="edit_room_descripton_ru">
                    <div class="field_label">Description in Russian</div>
                    <textarea rows="5" cols="45" name="text" class="field_textarea" placeholder="text here..."><?php echo $room[0]->getDescriptionRu(); ?></textarea>
                </div>

                <div class="center_line_large" id="edit_room_descripton_he">
                    <div class="field_label">Description in Hebrew</div>
                    <textarea rows="5" cols="45" name="text" class="field_textarea" placeholder="text here..."><?php echo $room[0]->getDescriptionHe(); ?></textarea>
                </div>

                <div class="center_line" id="edit_room_adult">
                    <div class="field_label">Adults in room</div>
                    <select class="field_select">
                        <?php for($i = 1; $i <=5; $i++) {
                            if ($i == $room[0]->getAdult()) {
                                echo '<option value="'.$i.'" selected="selected">'.$i.'</option>';
                            } else {
                                echo '<option value="'.$i.'">'.$i.'</option>';
                            }
                        } ?>
                    </select>
                </div>

                <div class="center_line" id="edit_room_children">
                    <div class="field_label">Children in room</div>
                    <select class="field_select">
                        <?php for($i = 0; $i <=4; $i++) {
                            if ($i == $room[0]->getChildren()) {
                                echo '<option value="'.$i.'" selected="selected">'.$i.'</option>';
                            } else {
                                echo '<option value="'.$i.'">'.$i.'</option>';
                            }
                        } ?>
                    </select>
                </div>
                
                <div class="center_line" id="edit_room_baby">
                    <div class="field_label">Babies in room</div>
                    <select class="field_select">
                        <?php for($i = 0; $i <=4; $i++) {
                            if ($i == $room[0]->getBaby()) {
                                echo '<option value="'.$i.'" selected="selected">'.$i.'</option>';
                            } else {
                                echo '<option value="'.$i.'">'.$i.'</option>';
                            }
                        } ?>
                    </select>
                </div>

                <div class="center_line">
                    <div class="field_button_positive" id="edit_room_save">Save</div>
                    <div class="field_button_negative" id="edit_room_cancel"><a href="<?php echo url_for('hoteldetails', array('id' => $room[0]->getHotelId())); ?>">Cancel</a></div>
                </div>

            </div>
        </div>
    </div>
</div>